<?php

        $file_handle = fopen("conf.txt", "r");
        $line = split(":",fgets($file_handle));

        $hostname= $line[0];
        $db_user= $line[1];
        $db_pass= $line[2];
        $db_name= chop($line[3]);

        fclose($file_handle);

        $con = mysql_connect($hostname,$db_user,$db_pass);
        
        if (!$con)
        {
            die('Could not connect: ' . mysql_error());
        }
        date_default_timezone_set('UTC');
        mysql_select_db($db_name, $con);
            
       $sql = "SELECT * FROM log ORDER BY update_datetime DESC";
       $result = mysql_query($sql);
       
       $update = mysql_fetch_row($result);
       
       echo $update[0];
       
?>
